package com.sl.au.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 投标 
 * 
 * @author Neil
 *
 */
@Entity
@Table(name = "sl_crm_bid")
public class Bid extends AuditRoot {
	/** 总原价 */
	@Column(name="nCostSum")
	private Float costSum;
	/** 总报价 */
	@Column(name="nSum")
	private Float sum;

	public Float getCostSum() {
		return costSum;
	}

	public void setCostSum(Float costSum) {
		this.costSum = costSum;
	}

	public Float getSum() {
		return sum;
	}

	public void setSum(Float sum) {
		this.sum = sum;
	}

	/**
	 * 订货单位ID
	 */
	@Column(name = "sCustomerId")
	private String customerId;
	
	public String getCustomerId() {
		return customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	/**
//	 * 普通价格单
//	 */
	@OneToOne
    @JoinColumn(name = "sQuoteId")
    private Quote quote;
	
	/**
//	 * 外贸价格单
//	 */
	@OneToOne
    @JoinColumn(name = "sQuoteForeignId")
    private QuoteForeign quoteForeign;
	
	/**
	 * 价格单类型: 
	 */
	@Column(name = "sQuoteType")
	private String quoteType;
	
	/**	创建者 */
	@ManyToOne
	private User user;
	
	/**
	 * 项目名称
	 */
	@Column(name = "sName", nullable = false)
	private String name;
	/**
	 * 投标类型
	 */
	@Column(name = "sType")
	private String type;
	/**
	 * 项目类型
	 */
	@Column(name = "sProjectType")
	private String projectType;

	/**
	 * 招标单位
	 */
	@Column(name = "sBidUnit", nullable = false)
	private String bidUnit;
	/**
	 * 业主单位
	 */
	@Column(name = "sOwnerUnit", nullable = false)
	private String ownerUnit;

	/**
	 * 发起部门
	 */
	@Column(name = "sLaunch", nullable = false)
	private String launch;
	/**
	 * 发起人
	 */
	@Column(name = "sLauncher")
	private String launcher;

	/**
	 * 保证金金额
	 */
	@Column(name = "nCash")
	private float cash;

	/**
	 * 保证金类型
	 */
	@Column(name = "sCashType")
	private String cashType;

	/**
	 * 投标日期
	 */
	@Column(name = "dBidDate")
	private Date bidDate;
	/**
	 * 投标状态
	 */
	@Column(name = "sState")
	private String state;
	
	/**
	 * 商务条款
	 */
	@Column(name = "sTerms")
	private String terms;
	
	/**
	 * 是否100万下常规产品
	 */
	@Column(name = "sIsUnder100")
	private String isUnder100;
	/**
	 * 是否新产品或液压隔离泵、自平衡泵
	 */
	@Column(name = "sIsNew")
	private String isNew;
	
	/**
	 * 是否外贸、除磷系统
	 */
	@Column(name = "sIsForeign")
	private String isForeign;
	
	/**
	 * 备注
	 */
	@Column(name = "sMemo")
	private String memo;

	
	
	
	public String getQuoteType() {
		return quoteType;
	}

	public void setQuoteType(String quoteType) {
		this.quoteType = quoteType;
	}

	public String getIsUnder100() {
		return isUnder100;
	}

	public void setIsUnder100(String isUnder100) {
		this.isUnder100 = isUnder100;
	}

	public String getIsNew() {
		return isNew;
	}

	public void setIsNew(String isNew) {
		this.isNew = isNew;
	}

	public String getIsForeign() {
		return isForeign;
	}

	public void setIsForeign(String isForeign) {
		this.isForeign = isForeign;
	}

	public String getTerms() {
		return terms;
	}

	public void setTerms(String terms) {
		this.terms = terms;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	/////// 投标反馈///////
	/**
	 * 反馈类型
	 */
	@Column(name = "sBackType")
	private String backType;
	/**
	 * 设备类型与数量
	 */
	@Column(name = "sDeviceAcount")
	private String deviceAcount;

	/**
	 * 自制设备价格
	 */
	@Column(name = "nSelfDevicePrice")
	private float selfDevicePrice;

	/**
	 * 购买设备价格
	 */
	@Column(name = "nBuyDevicePrice")
	private float buyDevicePrice;

	/**
	 * 付款方式
	 */
	@Column(name = "sPayType")
	private String payType;
	/**
	 * 投标总结
	 */
	@Column(name = "sSummary")
	private String summary;


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getProjectType() {
		return projectType;
	}

	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}

	public String getBidUnit() {
		return bidUnit;
	}

	public void setBidUnit(String bidUnit) {
		this.bidUnit = bidUnit;
	}

	public String getOwnerUnit() {
		return ownerUnit;
	}

	public void setOwnerUnit(String ownerUnit) {
		this.ownerUnit = ownerUnit;
	}

	public String getLaunch() {
		return launch;
	}

	public void setLaunch(String launch) {
		this.launch = launch;
	}

	public float getCash() {
		return cash;
	}

	public void setCash(float cash) {
		this.cash = cash;
	}

	public String getCashType() {
		return cashType;
	}

	public void setCashType(String cashType) {
		this.cashType = cashType;
	}

	

	public Date getBidDate() {
		return bidDate;
	}

	public void setBidDate(Date bidDate) {
		this.bidDate = bidDate;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getDeviceAcount() {
		return deviceAcount;
	}

	public void setDeviceAcount(String deviceAcount) {
		this.deviceAcount = deviceAcount;
	}

	public float getSelfDevicePrice() {
		return selfDevicePrice;
	}

	public void setSelfDevicePrice(float selfDevicePrice) {
		this.selfDevicePrice = selfDevicePrice;
	}

	public float getBuyDevicePrice() {
		return buyDevicePrice;
	}

	public void setBuyDevicePrice(float buyDevicePrice) {
		this.buyDevicePrice = buyDevicePrice;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getBackType() {
		return backType;
	}

	public void setBackType(String backType) {
		this.backType = backType;
	}

	public String getLauncher() {
		return launcher;
	}

	public void setLauncher(String launcher) {
		this.launcher = launcher;
	}

	public Quote getQuote() {
		return quote;
	}

	public void setQuote(Quote quote) {
		this.quote = quote;
	}

	public QuoteForeign getQuoteForeign() {
		return quoteForeign;
	}

	public void setQuoteForeign(QuoteForeign quoteForeign) {
		this.quoteForeign = quoteForeign;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	

}
